<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link type="text/css" rel="stylesheet" media="all"
	href="${pageContext.request.contextPath}/css/global.css" />
<link type="text/css" rel="stylesheet" media="all"
	href="${pageContext.request.contextPath}/css/global_color.css" />
</head>
<body>
	<!--Logo区域开始-->
	<div id="header">
		<img src="${pageContext.request.contextPath}/images/logo.png"
			alt="logo" class="left" /> <a href="#">[退出]</a>
	</div>
	<!--Logo区域结束-->
	<!--导航区域开始-->
	<%@ include file="../head.jsp" %>
	<!--导航区域结束-->
	<!--主要区域开始-->
	<div id="main">
		<!--保存操作的提示信息-->
		<div id="save_result_info" class="save_fail"></div>
		<form
			action="${pageContext.request.contextPath}/service/serviceadd.do"
			method="post" class="main_form">
			<!--内容项-->
			<div class="text_info clearfix">
				<span>身份证：</span>
			</div>
			<div class="input_info">
				<input type="text" name="sidcard" value="${service.sidcard}"
					class="width180" />
				<!-- <span class="required">*</span>
                    <div class="validate_msg_short">没有此身份证号，请重新录入。</div> -->
			</div>
			<div class="text_info clearfix">
				<span>账务账号：</span>
			</div>
			<div class="input_info">
				<input type="text" name="saccountid" value="${service.saccountid}"
					onkeyup="searchAccounts(this);" />
				<!-- <span class="required">*</span>
                    <div class="validate_msg_long">没有此账务账号，请重新录入。</div> -->
			</div>
			<div class="text_info clearfix">
				<span>姓名：</span>
			</div>
			<div class="input_info">
				<input type="text" name="sname" value="${service.sname}" />
			</div>
			<div class="text_info clearfix">
				<span>资费类型：</span>
			</div>
			<div class="input_info">
				<select name="scostname">
					<option>包20小时</option>
					<option>包40小时</option>
					<option>包60小时</option>
					<option>包月</option>
				</select>
			</div>
			<div class="text_info clearfix">
				<span>服务器 IP：</span>
			</div>
			<div class="input_info">
				<input type="text" name="sip" value="${service.sip}" />
			</div>
			<div class="text_info clearfix">
				<span>登录 OS 账号：</span>
			</div>
			<div class="input_info">
				<input type="text" name="sosname" value="${service.sosname}" />
			</div>
			<div class="text_info clearfix">
				<span>密码：</span>
			</div>
			<div class="input_info">
				<input type="password" name="spsw" />
				<!-- <span class="required">*</span>
                    <div class="validate_msg_long">30长度以内的字母、数字和下划线的组合</div> -->
			</div>
			<div class="text_info clearfix">
				<span>重复密码：</span>
			</div>
			<div class="input_info">
				<input type="password" />
				<!-- <span class="required">*</span>
                    <div class="validate_msg_long">两次密码必须相同</div> -->
			</div>
			<!--操作按钮-->
			<div class="button_info clearfix">
				<input type="submit" value="保存" class="btn_save" /> <input
					type="button" value="取消" class="btn_save"
					onclick="location.href='${pageContext.request.contextPath}/service/showServicelist.do';" />
			</div>
		</form>
	</div>
	<!--主要区域结束-->
	<div id="footer"></div>
	<script type="text/javascript">
            //保存成功的提示信息
            var i = "${requestScope.flag1}";
            if(i == '1'){
            	document.getElementById("save_result_info").innerHTML="保存成功!";
            	showResult();
            }
            if(i == '0'){
            	document.getElementById("save_result_info").innerHTML="保存失败!!!!!!!!!!!!";
            	showResult();
            }
            function showResult() {
            	
                showResultDiv(true);
                window.setTimeout("showResultDiv(false);", 3000);
            }
            function showResultDiv(flag) {
                var divResult = document.getElementById("save_result_info");
                if (flag)
                    divResult.style.display = "block";
                else
                    divResult.style.display = "none";
            }
        </script>
</body>
</html>
